let configNuxt = require('./config');
let dayjs1 = require('dayjs');
module.exports = {
    mode: 'universal',
    /*
     ** Headers of the page
     */
    head: {
        title: process.env.npm_package_name || '',
        meta: [
            {
                charset: 'utf-8',
            },
            {
                name: 'viewport',
                content:
                    'width=device-width, initial-scale=1, user-scalable=no',
            },
            {
                name: 'version',
                content: configNuxt.verison,
                time: dayjs1().format('YYYY-MM-DD HH:mm:ss SSS [Z] A'), // 展示
            },
        ],
        link: [
            {
                rel: 'icon',
                type: 'image/x-icon',
                href: '/favicon.ico',
            },
        ],
    },
    server: {
        port: configNuxt.PORT, // default: 4000
        host: '0.0.0.0', // default: localhost,
        timing: {
            total: true,
        },
    },

    env: {
        PATH_ENV: process.env.PATH_ENV,
        NODE_ENV: process.env.NODE_ENV,
    },
    /*
     ** Customize the progress-bar color
     */
    loading: {
        color: '#061B52',
    },
    router: {
        middleware: 'auth',
    },
    css: ['element-ui/lib/theme-chalk/index.css'],
    /*
     ** Plugins to load before mounting the App
     */
    plugins: [
        '@/plugins/element-ui.ts',
        '~/plugins/axios.ts',
        '~/plugins/day.ts',
        '~/plugins/point.ts',
        '~/plugins/cookie.ts',
    ],
    buildModules: ['@nuxt/typescript-build'],
    modules: ['@nuxtjs/axios'],
    axios: {},
    /*
     ** Build configuration
     */
    build: {
        publicPath: configNuxt.cdn,
    },
};
